#version 330 core

layout(location = 0) in vec3 aPos;

uniform mat4 projection;

out float radius;

void main() {
    vec2 screenPos = aPos.xy;
    radius = aPos.z;

    gl_Position = projection * vec4(screenPos, 0.0, 1.0);
    gl_PointSize = radius * 2.0;
}